#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <poll.h>

/*	test
  */
int main(int argc, char ** argv)
{
	int fd,ret;
	unsigned char key_val;

	fd = open("/dev/button",O_RDWR );
	if (fd < 0)
	{
		printf("can't open !\n");
	}

	while(1)
	{
		ret = read(fd, &key_val, sizeof(key_val));
		printf("key_val = 0x%x, ret = %d\n",key_val,ret);
		//sleep(5);
	}
}

